<?php
class Excursion
{
    /**
     * @var object Zend DB Adapter
     */
    private $_db;
    
    public function __construct()
    {
			$this->_db = Zend_Registry::get('db');
    }
    
    public function getExcursions()
    {
    	$this->_db->query("SET NAMES 'utf8'");
    	$sql = $this->_db->fetchAll("
    		select * from excursion");

        return $sql;
    }

    public function getExcursionDetailsById($id)
    {
    	$this->_db->query("SET NAMES 'utf8'");
    	$sql = $this->_db->fetchRow("
    		select * from excursion
    		WHERE id = " . $id);

    	return $sql;
    }
    
    public function getExcursionDetails()
    {
    	$this->_db->query("SET NAMES 'utf8'");
    	$sql = $this->_db->fetchAll("select * from excursion where active=1");
    	
    	return $sql;
    }
} 
?>